package org.cargloss.cp.controller.modul.news;


import org.cargloss.cp.model.News;

import util.hibernate.DAO;

import com.opensymphony.xwork2.ActionSupport;

public class ActionObject extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private News news;
	private int id;


	public String execute() {
		DAO<Integer> dao = new DAO<Integer>();
		dao.createCriteria(News.class);
		dao.addFilter("eq", "id", id);
		news = (News) dao.findUnique();
		dao.close();
		return SUCCESS;
	}

	
	public News getNews() {
		return news;
	}



	public void setNews(News news) {
		this.news = news;
	}
	

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

}
